]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Disable unredirection while showing banners
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 12 Aug 2018 23:25:13 +0000 (01:25 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Thu, 8 Nov 2018 12:51:27 +0000 (12:51 +0000)
We don't usually show notification banners while the monitor is in
fullscreen, but when we do - the notification is urgent - we should
actually show the banner, even if the top-most window is unredirected.
To achieve that, disable unredirection while the banner is showing.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/430

js/ui/messageTray.js

index c0766566cb2ce43c6b79f62884e111868d088185..84681569ee7cf660182bba31990cf1b8c5c260a0 100644 (file)
@@ -1295,8 +1295,10 @@ var MessageTray = new Lang.Class({
         }
 
         this._banner = this._notification.createBanner();
-        this._bannerClickedId = this._banner.connect('done-displaying',
-                                                     this._escapeTray.bind(this));
+        this._bannerClickedId = this._banner.connect('done-displaying', () => {
+            Meta.enable_unredirect_for_display(global.display);
+            this._escapeTray();
+        });
         this._bannerUnfocusedId = this._banner.connect('unfocused', () => {
             this._updateState();
         });
@@ -1308,6 +1310,7 @@ var MessageTray = new Lang.Class({
         this._bannerBin.y = -this._banner.actor.height;
         this.actor.show();
 
+        Meta.disable_unredirect_for_display(global.display);
         this._updateShowingNotification();
 
         let [x, y, mods] = global.get_pointer();